{
*******************************************************************************
-------------------------------------------------------------------------------
Kliper - next generation multimedia player
Copyright (C) Marcin 'vi4m' Kliks (vi4m@wp.pl)
Copyright (C) Tomasz 'dymsza' Odrobny (dymsza@gmail.com)
-------------------------------------------------------------------------------
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*******************************************************************************
}

unit Uwlasci;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Grids, utils ;

type
  Tfrwlasciwosci = class(TForm)
    Button1: TButton;
    table: TStringGrid;
    procedure FormShow(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    row: integer;
    { Private declarations }
  public
    procedure addInfo(a, b: string);
    { Public declarations }
  end;

var
  frwlasciwosci: Tfrwlasciwosci;

implementation


{$R *.dfm}
uses player, main;

procedure Tfrwlasciwosci.FormShow(Sender: TObject);
begin
  addinfo('KTS_GENERIC_FILENAME', kplayer.engine.getfileinfo.VIDEO_FILENAME);
  addinfo('KTS_GENERIC_CODEC', kplayer.engine.getfileinfo.VIDEO_FORMAT);
  addinfo('KTS_GENERIC_WIDTH', inttostr(kplayer.engine.getfileinfo.VIDEO_WIDTH));
  addinfo('KTS_GENERIC_HEIGHT', IntToStr(kplayer.engine.getfileinfo.VIDEO_HEIGHT));
  addinfo('KTS_GENERIC_FPS', FloatToStr(kplayer.engine.getfileinfo.VIDEO_FPS));
  addinfo('KTS_GENERIC_ACODEC', kplayer.engine.getfileinfo.AUDIO_CODEC);
  addinfo('KTS_GENERIC_ABITRATE', IntToStr(kplayer.engine.getfileinfo.AUDIO_RATE));
  addinfo('KTS_GENERIC_ACHANNELS', IntToStr(kplayer.engine.getfileinfo.AUDIO_NCH));

end;

procedure Tfrwlasciwosci.Button1Click(Sender: TObject);
begin
  close;
end;

procedure Tfrwlasciwosci.addInfo(a, b: string);
begin
  table.Cells[0, row] := translatestr(a);
  table.Cells[1, row] := b;
  inc(row);

end;

procedure Tfrwlasciwosci.FormActivate(Sender: TObject);
begin
  main.mainform.loadlanguage('frwlasciwosci', 'lang\' + getlang);
end;

end.
